Repository navigation
fix: Signal a link that resolves into a watched directory, and say which deployments watching does not follow - #484
Open
kinyoklion wants to merge 2 commits into
Open
kinyoklion wants to merge 2 commits into
kinyoklion wants to merge 2 commits into
Conversation
Member
Author
|
bugbot review |
…ich deployments watching does not follow A retry that resolved a configured link to a target in a directory that was already watched added no watch and so ran no callback, and the content that appeared meanwhile was not read until a later change. The retry now runs the callback whenever a link leads to a new target. The watcher comment now names the changes that watching does not follow, a link further along the chain or a configured directory that is pointed elsewhere or replaced, and points such deployments to polling.
A link whose target directory could not be watched counted as a new target on every retry, so the callback ran once a second while the watch kept failing. A target counts as new only in a directory that is already watched, and a new directory counts once its watch is added.
kinyoklion
force-pushed
the
rlamb/overrides-ruby-watcher-links
branch
from
November 10, 2026 21:32
294127d to
d232195
Compare
Member
Author
|
bugbot review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit d232195. Configure here.
kinyoklion
marked this pull request as ready for review
November 10, 2026 23:36
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #449 for two findings raised on the Python port of the same watcher (launchdarkly/python-server-sdk#525), both of which apply here.
refresh_linksnow reports a change whenever a link leads to a target it did not lead to before, so the retry runs the callback once.currentlink to a release directory, to polling, which is the default. The override source'schange_detectiondocumentation says the same in feat: Add the file-based override source #453.Tests
A new watcher spec configures a link that leads through a directory that does not exist yet to a directory that another configured file keeps watched, then creates the missing directory as a link. It fails without the change and passes with it. The watcher specs pass (24 examples), the full suite passes apart from
spec/launchdarkly-server-sdk_spec.rb:5, which fails the same way onfeat/overrideson this box because Bundler cannot write its lock file, and RuboCop reports no offenses.SDK-3249
Opened from termag
Note
Overview
Fixes file data watcher behavior when a configured symlink finally resolves to a file in a directory that was already being watched (e.g. another configured path).
refresh_linksnow treats newly discovered link targets in existing watches as a change, so the retry loop invokeson_changeonce instead of silently skipping until some unrelated filesystem event.Watcher docs are tightened to list symlink/deployment patterns inotify does not track (mid-chain repointing, directory-as-symlink swaps, rename-and-replace layouts) and to steer
current→ release style setups toward polling.Specs cover resolution into an already-watched directory and assert the callback is not fired on every failed watch retry.
Reviewed by Cursor Bugbot for commit d232195. Bugbot is set up for automated code reviews on this repo. Configure here.